﻿using DataWorks_Sqlite.MappingClass;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataWorks_Sqlite.MappingClassConfig
{
    internal class dw_props_user_halfhourimport_config : IEntityTypeConfiguration<dw_props_user_halfhourimport>
    {
        public void Configure(EntityTypeBuilder<dw_props_user_halfhourimport> builder)
        {
            builder.ToTable("dw_props_user_halfhourimport");
            builder.HasKey(b => b.key);
            builder.Property(a => a.loginname).HasMaxLength(255).IsRequired();
            builder.Property(a => a.vehicle).HasMaxLength(255).IsRequired();
            builder.Property(a => a.project).HasMaxLength(255).IsRequired();
            builder.Property(a => a.ecnumber).HasMaxLength(255).IsRequired();
            builder.Property(a => a.savepath).HasMaxLength(1000).IsRequired();
            builder.Property(a => a.inputpath).HasMaxLength(1000).IsRequired();
            builder.Property(a => a.remarks).HasMaxLength(1000).IsRequired();
            builder.Property(a => a.chantitle_spd).HasMaxLength(255).IsRequired();
            builder.Property(a => a.chantitle_throttle).HasMaxLength(255).IsRequired();
            builder.Property(a => a.chantitle_brake).HasMaxLength(255).IsRequired();
            builder.Property(a => a.chantitle_steering).HasMaxLength(255).IsRequired();
            builder.Property(a => a.chantitle_engspd).HasMaxLength(255).IsRequired();
            builder.Property(a => a.chantitle_accybody).HasMaxLength(255).IsRequired();
            builder.Property(a => a.importgps).HasColumnType("REAL").IsRequired();
            builder.Property(a => a.importspd).HasColumnType("REAL").IsRequired();
            builder.Property(a => a.importstatistic).HasColumnType("REAL").IsRequired();
            builder.Property(a => a.importsteering).HasColumnType("REAL").IsRequired();
            builder.Property(a => a.importengrpm).HasColumnType("REAL").IsRequired();
            builder.Property(a => a.importspdfromto).HasColumnType("REAL").IsRequired();
            builder.Property(a => a.brakezerostandard).HasColumnType("REAL").IsRequired();


        }
    }
}
